
if (CONFIG_HAL_POSIX_ENABLE)
message("CONFIG_HAL_POSIX_ENABLE = ${CONFIG_HAL_POSIX_ENABLE}")
aux_source_directory(source/hal_linux HAL)

elseif (CONFIG_HAL_STM32L0_ENABLE)
message("CONFIG_HAL_STM32L0_ENABLE = ${CONFIG_HAL_STM32L0_ENABLE}")
aux_source_directory(source/hal_stm32l0 HAL)

elseif (CONFIG_HAL_STM32L1_ENABLE)
message("CONFIG_HAL_STM32L1_ENABLE = ${CONFIG_HAL_STM32L1_ENABLE}")
aux_source_directory(source/hal_stm32l1 HAL)

elseif (CONFIG_HAL_STM32L4_ENABLE)
message("CONFIG_HAL_STM32L4_ENABLE = ${CONFIG_HAL_STM32L4_ENABLE}")
aux_source_directory(source/hal_stm32l4 HAL)

elseif (CONFIG_HAL_STM32F0_ENABLE)
message("CONFIG_HAL_STM32F0_ENABLE = ${CONFIG_HAL_STM32F0_ENABLE}")
aux_source_directory(source/hal_stm32f0 HAL)

elseif (CONFIG_HAL_STM32F1_ENABLE)
message("CONFIG_HAL_STM32F1_ENABLE = ${CONFIG_HAL_STM32F1_ENABLE}")
aux_source_directory(source/hal_stm32f1 HAL)

elseif (CONFIG_HAL_STM32F3_ENABLE)
message("CONFIG_HAL_STM32F3_ENABLE = ${CONFIG_HAL_STM32F3_ENABLE}")
aux_source_directory(source/hal_stm32f3 HAL)

elseif (CONFIG_HAL_STM32F4_ENABLE)
message("CONFIG_HAL_STM32F4_ENABLE = ${CONFIG_HAL_STM32F4_ENABLE}")
aux_source_directory(source/hal_stm32f4 HAL)

elseif (CONFIG_HAL_EFM32LG_ENABLE)
message("CONFIG_HAL_EFM32LG_ENABLE = ${CONFIG_HAL_EFM32LG_ENABLE}")
aux_source_directory(source/hal_efm32lg HAL)

elseif(CONFIG_HAL_HISI_ENABLE)
message("CONFIG_HAL_HISI_ENABLE = ${CONFIG_HAL_HISI_ENABLE}")
aux_source_directory(source/hal_hi HAL)

elseif(CONFIG_HAL_ESP32_ENABLE)
message("CONFIG_HAL_ESP32_ENABLE = ${CONFIG_HAL_ESP32_ENABLE}")
aux_source_directory(source/hal_esp32 HAL)

elseif(CONFIG_HAL_BK72XX_ENABLE)
message("CONFIG_HAL_BK72XX_ENABLE = ${CONFIG_HAL_BK72XX_ENABLE}")
aux_source_directory(source/hal_bk72 HAL)

elseif(CONFIG_HAL_OPL1x_ENABLE)
message("CONFIG_HAL_OPL1x_ENABLE = ${CONFIG_HAL_OPL1x_ENABLE}")
aux_source_directory(source/hal_opl1x HAL)
endif()

add_library(hal
          STATIC
          ${HAL}
          )

